package cn.xfdzx.android.apps.shop.contract;

import cn.xfdzx.android.apps.shop.base.BaseView;
import cn.xfdzx.android.apps.shop.bean.ClassShopBeen;
import cn.xfdzx.android.apps.shop.bean.ConfirmGoodBeen;
import cn.xfdzx.android.apps.shop.bean.FamliyItemBeen;
import io.reactivex.Flowable;


/**
 * @author azheng
 * @date 2018/6/4.
 * Description：
 */

public interface FamilyContract {
    interface Model {
        Flowable<FamliyItemBeen> initData(  String page, String limit);


        Flowable<ConfirmGoodBeen> addCar(String is_new, String uniqueId, String productId, String cartNum);
    }

    interface View extends BaseView {
        @Override
        void showLoading();

        @Override
        void hideLoading();

        @Override
        void onError(Throwable throwable);

        void onInitSuccess(FamliyItemBeen bean);


        void onAddCarSuccess(ConfirmGoodBeen bean,int position,int total_num);
        /**
         * 刷新完成
         */
        void finishRefresh();

        /**
         * 加载完成
         */
        void finishLoadMore();
    }

    interface Presenter {
        /**

         */
        void initData(boolean isRefresh, boolean isLoading,  String page, String limit );


        void addCar(String is_new,String uniqueId,String productId,String cartNum,int position,int total_num);

    }
}
